﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;

namespace ModernShopping.AppCode
{
    public class DbAccount
    {
        public const string ADMIN = "Admin";
        public const string GUESS = "Guess";
        public const string USER = "User";

        public static string GetRole(Guid UserID)
        {
            string Username = Membership.GetUser(UserID).UserName;
            string Role = Roles.GetRolesForUser(Username).FirstOrDefault();
            return Role != null ? Role : null;
        }
    }
}